//
//  SFNavigationController.m
//  SFNavigationBarManager_Example
//
//  Created by shen on 2021/11/17.
//  Copyright © 2021 yangshen. All rights reserved.
//

#import "SFNavigationController.h"

@interface SFNavigationController () <UIGestureRecognizerDelegate>

@end

@implementation SFNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.interactivePopGestureRecognizer.delegate = self;
}

#pragma mark - UIGestureRecognizerDelegate
// 手势的代理方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
    BOOL isShould = NO;
    if (self.childViewControllers.count <= 1) {
        isShould = NO;
    } else {
        isShould = YES;
    }
    return isShould;
}

@end
